package com.voodoo.lib_crashexception.model;

import android.os.Build;

import java.io.Serializable;
import java.util.Locale;

public class Device implements Serializable {

    // 厂商名称
    private String manufacturer = Build.MANUFACTURER;
    // 产品名称
    private String product = Build.PRODUCT;
    // 手机品牌
    private String brand = Build.BRAND;
    // 手机型号
    private String model = Build.MODEL;
    // 主板名称
    private String board = Build.BOARD;
    // 设备名称
    private String mydevice = Build.DEVICE;
    // 系统SDK版本
    private int sdkInt = Build.VERSION.SDK_INT;
    // Android版本
    private String androidVersion = Build.VERSION.RELEASE;
    // 系统语言
    private String language = Locale.getDefault().getLanguage();

    public String getManufacturer() {
        return manufacturer;
    }

    public String getProduct() {
        return product;
    }

    public String getBrand() {
        return brand;
    }

    public String getModel() {
        return model;
    }

    public String getBoard() {
        return board;
    }

    public String getMydevice() {
        return mydevice;
    }

    public int getSdkInt() {
        return sdkInt;
    }

    public String getAndroidVersion() {
        return androidVersion;
    }

    public String getLanguage() {
        return language;
    }

    @Override
    public String toString() {
        return String.format("[厂商名称 = %s]\n[产品名称 = %s]\n[手机品牌 = %s]\n[手机型号 = %s]\n[主板名称 = %s]\n[设备名称 = %s]\n[系统SDK版本 = %s]\n[Android版本 = %s]\n[系统语言 = %s]"
                , manufacturer, product, brand
                , model, board, mydevice
                , sdkInt, androidVersion, language);
    }
}
